﻿using System;
using System.Windows.Forms;

namespace Read_the_Reader
{
    static class Program
    {
        /// <summary>
        /// Der Haupteinstiegspunkt für die Anwendung.
        /// </summary>
        [STAThread]
        static void Main()
        {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (Environment.GetCommandLineArgs().Length <= 1)
                    Application.Run(new Mainform());
                else
                    switch (Environment.GetCommandLineArgs()[1])
                    {
                        case Strings.ParmUpdateNow:
                            NativeMethods.SendMessage(Strings.Title, NativeMethods.UpdateNow, IntPtr.Zero, IntPtr.Zero);
                            break;

                        case Strings.ParmUpdateInterval:
                            NativeMethods.SendMessage(Strings.Title, NativeMethods.UpdateInterval, IntPtr.Zero, IntPtr.Zero);
                            break;

                        case Strings.ParmInfo:
                            NativeMethods.SendMessage(Strings.Title, NativeMethods.Info, IntPtr.Zero, IntPtr.Zero);
                            break;
                        default:
                            Application.Run(new Mainform());
                            break;
                    }
        }
    }
}
